package com.eastfair.imaster.service;

import com.eastfair.config.dto.AttachmentDTO;
import com.eastfair.enums.BusinessTypeEnum;

import java.util.List;

/**
 * Date:2021/9/6
 * Time:14:26
 *
 * @author zjn
 */
public interface SelfAttachmentService {

    /**
     * 批量新增附件
     *
     * @param attachmentDTOList 附件列表
     * @param businessType      业务类型
     * @param businessId        业务id
     * @return 是否新增成功
     */
    Boolean saveAttachments(List<AttachmentDTO> attachmentDTOList, BusinessTypeEnum businessType, Long businessId);

    /**
     * 组装附件列表（填充业务类型，业务id，主键id）
     *
     * @param attachmentDTOList 附件列表
     * @param businessType      业务类型
     * @param businessId        业务id
     * @return 附件列表
     */
    List<AttachmentDTO> convertAttachments(List<AttachmentDTO> attachmentDTOList, BusinessTypeEnum businessType, Long businessId);

}
